package org.jb.coinche.client.business.model;

import java.util.HashMap;
import java.util.Map;

import org.jb.coinche.client.guistatemachine.AbstractState;

public class CoincheAuction extends AbstractState implements GameState {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1355443692758472606L;

	private String coincheUser;
	private Auction auction;
	private Game game;
	private Map< Player, Auction > mapAuctions = new HashMap< Player, Auction >();

	/**
	 * @param coincheUser the coincheUser to set
	 */
	public void setCoincheUser(String coincheUser) {
		this.coincheUser = coincheUser;
	}
	/**
	 * @return the coincheUser
	 */
	public String getCoincheUser() {
		return coincheUser;
	}
	/**
	 * @param auction the auction to set
	 */
	public void setAuction(Auction auction) {
		this.auction = auction;
	}
	/**
	 * @return the auction
	 */
	public Auction getAuction() {
		return auction;
	}
	/**
	 * @param game the game to set
	 */
	public void setGame(Game game) {
		this.game = game;
	}
	/**
	 * @return the game
	 */
	public Game getGame() {
		return game;
	}
	
	/**
	 * 
	 * @param p
	 * @return
	 */
	public Auction getPlayerAuction( Player p ) {
		return mapAuctions.get(p);
	}
	
	/**
	 * 
	 * @param p
	 * @param auction
	 */
	public void setPlayerAuction( Player p, Auction auction ) {
		mapAuctions.put(p, auction);
	}
}
